<%--
 * header.jsp
 *
 * Copyright (C) 2014 Universidad de Sevilla
 * 
 * The use of this project is hereby constrained to the conditions of the 
 * TDG Licence, a copy of which you may download from 
 * http://www.tdg-seville.info/License.html
 --%>

<%@page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>

<%@taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@taglib prefix="security"
	uri="http://www.springframework.org/security/tags"%>

<div>
	<img src="images/logo.png" alt="Acme-Gallery Co., Inc." />
</div>

<div>
	<ul id="jMenu">
		<!-- Do not forget the "fNiv" class for the first level links !! -->
		<security:authorize access="hasRole('ADMINISTRATOR')">
			<li><a class="fNiv"><spring:message
						code="master.page.administrator" /></a>
				<ul>
					<li class="arrow"></li>
					<li><a href="customer/administrator/list.do"><spring:message
								code="master.page.customer.list" /></a></li>
					<li><a href="auction/administrator/finishedList.do"><spring:message
								code="master.page.auction.finishedList" /></a></li>
				</ul></li>
			<li><a class="fNiv"
				href="security/registration/administrator.do"><spring:message
						code="master.page.register.admin" /></a></li>

			<li><a class="fNiv" href="dashboard/administrator/list.do"><spring:message
						code="master.page.dashboard" /></a></li>

		</security:authorize>

		<security:authorize access="hasRole('CUSTOMER')">
			<li><a class="fNiv"><spring:message
						code="master.page.customer" /></a>
				<ul>
					<li class="arrow"></li>
					<li><a href="auction/customer/myAuctions.do"><spring:message
								code="master.page.myAuctions" /></a></li>
					<li><a href="auction/customer/myFinishedAuctionsList.do"><spring:message
								code="master.page.myFinishedAuctions" /></a></li>
					<li><a href="auction/customer/activeAuctionsListByOther.do"><spring:message
								code="master.page.activeAuctionsListByOther" /></a></li>
				</ul></li>
			<li><a class="fNiv"><spring:message
						code="master.page.painting" /></a>
				<ul>
					<li class="arrow"></li>
					<li><a href="painting/customer/list.do"><spring:message
								code="master.page.allPaintings" /></a></li>

					<li><a href="painting/customer/ownedList.do"><spring:message
								code="master.page.ownedPaintings" /></a></li>
					<li><a href="painting/customer/create.do"><spring:message
								code="master.page.createPaintings" /></a></li>

				</ul></li>
			<li><a class="fNiv"><spring:message
						code="master.page.gallery" /></a>
				<ul>
					<li class="arrow"></li>
					<li><a href="gallery/customer/ownedList.do"><spring:message
								code="master.page.ownedGalleries" /></a></li>
					<li><a href="gallery/customer/create.do"><spring:message
								code="master.page.createGallery" /></a></li>

				</ul></li>
		</security:authorize>

		<security:authorize access="isAnonymous()">
			<li><a class="fNiv" href="security/login.do"><spring:message
						code="master.page.login" /></a></li>
			<li><a class="fNiv" href="customer/list.do"><spring:message
						code="master.page.customer.list" /></a></li>
			<li><a class="fNiv" href="auction/activeList.do"><spring:message
						code="master.page.auction.active" /></a></li>

			<li><a class="fNiv"
				href="security/registration/registerCustomer.do"><spring:message
						code="master.page.registration" /></a></li>
		</security:authorize>

		<security:authorize access="isAuthenticated()">
			<li><a class="fNiv"> <spring:message
						code="master.page.profile" /> (<security:authentication
						property="principal.username" />)
			</a>
				<ul>
					<li class="arrow"></li>

					<li><a href="j_spring_security_logout"><spring:message
								code="master.page.logout" /> </a></li>
				</ul></li>
		</security:authorize>
	</ul>
</div>

<div>
	<a href="?language=en">en</a> | <a href="?language=es">es</a>
</div>

